package teach.aistar.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

import teach.aistar.mapper.CarDetailMapper;
import teach.aistar.mapper.TestMapper;
import teach.aistar.model.entity.Admin;
import teach.aistar.model.entity.CarDetail;
import teach.aistar.service.IPaginService;

import java.util.List;

public class PaginServiceImpl implements IPaginService {
    @Autowired
    TestMapper testMapper;

    @Autowired
    CarDetailMapper carDetailMapper;
    @Override
    public PageInfo<CarDetail> findAll() {

        PageHelper.startPage(0,1);
        List<CarDetail> carDetails = carDetailMapper.selectAll();
       PageInfo<CarDetail> pageInfo = new PageInfo<>(carDetails);

        return pageInfo;


    }
}
